using System;
using Castle.ActiveRecord;
using CosyTrade.Data;

namespace CosyTrade.Store
{
    [AddPropertyChangedNotifyInterface, PropertyChangedNotify]
    [ActiveRecord("tabProductCategory"), Serializable]
    public class ProductCategory : ProductCategoryBase
    {
        private ProductCategoryBase parentCategoryBase;

        [JoinedKey("ROWGUID")]
        public Guid RelationKey
        {
            get { return PrimaryKey; }
        }
        
        [BelongsTo("ParentGuid")]
        public ProductCategoryBase ParentCategoryBase
        {
            get { return parentCategoryBase; }
            set { parentCategoryBase = value; }
        }
    }
}